﻿using UnityEngine;
using System.Collections;

public class StageSplash : MonoBehaviour
{
	// Properties

	[SerializeField]
	TextMesh			m_title;
	[SerializeField]
	SpriteRenderer		m_icon;
	[SerializeField]
	SpriteRenderer		m_altIcon;


	// Members


	/// <summary>
	/// 화면에 보여지는지 여부
	/// </summary>
	/// <value><c>true</c> if showing; otherwise, <c>false</c>.</value>
	public bool showing
	{
		get
		{
			return gameObject.activeSelf;
		}
		set
		{
			gameObject.SetActive(value);
		}
	}

	public string title
	{
		get 
		{
			return m_title.text;
		}
		set
		{
			m_title.text	= value;
		}
	}

	public void SetIcon(string spritePath)
	{
		m_icon.sprite		= ResourceDepot.Load<Sprite>(spritePath);
	}

	public void UseAltIcon()
	{
		m_icon.gameObject.SetActive(false);
		m_altIcon.gameObject.SetActive(true);
	}
}
